import { IPage } from ".";

export type IActionType =
  | "MISSION_READ"
  | "MISSION_WATCH"
  | "MISSION_CHECK_IN"
  | "MISSION_EXAM";

export type IMissionRecordReq = {
  actionType: IActionType;
  mainId: null | number;
  categoryId: null | number;
  watchDuration?: null | number;
  isFinished: number;
};

export type IArticalDetailRes = {
  articleId: number;
  id: number;
  author: string;
  banner: string | null;
  collectCount: number;
  hasCollected: boolean;
  likeCount: number;
  hasLiked: boolean;
  content: string;
  fileName: string;
  name: string;
  publishTime: string;
  createdAt: string;
  updatedAt: string;
  rawHtml: string;
  shareCount: number;
  status: number;
  viewCount: number;
  categoryId: number;
  video: string;
  videos: string[];
  hasReview: boolean;
};

export type ISelfMissionItem = {
  actionRelatedData: number;
  actionRelatedType: string;
  actionType: IActionType;
  completedCount: number;
  completedPercent: number;
  description: string;
  id: number;
  name: string;
  pointsRule: string;
  targetCount: number;
};

export type IDocumentListReq = {
  id: number;
} & IPage;

export type IArticalCategoryItem = {
  node: string;
  createdAt: string;
  description: string;
  id: number;
  isDeleted: number;
  name: string;
  sortOrder: string;
  status: number;
  updatedAt: string;
  children: IArticalCategoryItem[];
};

export type ICaterogyItem = {
  code: string;
  description: string;
  hasSymptoms: boolean;
  id: number;
  name: string;
};

export type ICatalogItem = {
  articleId: number;
  categoryId: number;
  code: string;
  description: string;
  id: number;
  isVisible: boolean;
  isFinish: boolean;
  name: string;
  pushEndTime: string;
  pushStartTime: string;
  children: ICatalogItem[];
  banner: string;
};

export type IArticalReviewReq = {
  helpfulnessScore: number;
  pushSatisfactionScore: number;
  contentSatisfactionScore: number;
};
